// 商户App 进件模块

import Request from "@/utils/request";

export default {
    // 商户进件字典
    collectionDic() {
        return Request.get("/mainIndex/dic/merchant", {});
    },

    // 商户基本信息查询
    collectionBaseInfo(merchantCode: string) {
        return Request.getWithLoading(
            `mer/getDetail/basic/${merchantCode}`,
            {}
        );
    },

    // 身份证信息查询
    collectionIdCard(merchantCode: string) {
        return Request.getWithLoading(
            `mer/getDetail/idCard/${merchantCode}`,
            {}
        );
    },

    // 银行卡信息查询
    collectionBankCard(merchantCode: string) {
        return Request.getWithLoading(
            `mer/getDetail/bankCard/${merchantCode}`,
            {}
        );
    },

    // 保存、更新 商户基本信息
    collectionSaveBase(data: any) {
        return Request.postWithLoading(`mer/addInfo/basic`, data);
    },

    // 保存、更新 身份证
    collectionSaveIdCard(data: any) {
        return Request.postWithLoading(`mer/addInfo/idCard`, data);
    },

    // 保存、更新 商户 银行卡信息
    collectionSaveBankInfo(data: any) {
        return Request.postWithLoading(`bankCard/addInfo`, data);
    },

    // 商户全信息查询
    collectionFullInfo(merchantCode: string) {
        return Request.getWithLoading(`mer/getDetail/full/${merchantCode}`, {});
    },

    // bank 联行号查询
    collectionBankNo(data: object) {
        return Request.postList(`bankInfo/branch`, data);
    },

    // 
    collectionSendCode() {
        return Request.post(`sms/mer/register`, {});
    },

    // 
    collectionSubmit(data: object){
        return Request.postWithLoading(`mer/addInfo/final`, data);

    }
};
